package dtrs.corba.server.common;

import java.io.Serializable;

/**
 * Object the transport between the client and the server,
 *  represent the values used by a reservation
 * 
 * Also is useful in case to know the tickets already reserved by a client
 * @author Mary
 *
 */
public class ShowDTO implements Serializable, Cloneable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	String nameOffice;
	String showID;
	Integer numberOfTickets;
	String nameShow;
	Integer numberOfTicketsLeft;
	boolean successOper;

	
	
	
	public ShowDTO() {
		
	}
	
	
	  public Object clone() {
          
		  ShowDTO obj = new ShowDTO();
          obj.setNameOffice(this.nameOffice);
          obj.setShowID(this.showID);
          obj.setNumberOfTickets(this.numberOfTickets);
          obj.setNumberOfTicketsLeft(this.numberOfTicketsLeft);
          return obj;
      }
	
	
    public ShowDTO(String nameOfficeP, String showIdP, Integer numberOfTicketsP, 
    				Integer numberOfTicketsLeftP) {
    	setNameOffice(nameOfficeP);
    	setShowID(showIdP);
    	setNumberOfTickets(numberOfTicketsP);
    	setNumberOfTicketsLeft(numberOfTicketsLeftP);
		
	}

    public String getNameShow(){
    	return nameShow = getNameOffice() + getShowID();
    }
    
	public String getNameOffice() {
		return nameOffice;
	}
	public void setNameOffice(String nameOffice) {
		this.nameOffice = nameOffice;
	}
	public String getShowID() {
		return showID;
	}
	public void setShowID(String showID) {
		this.showID = showID;
	}
	public Integer getNumberOfTickets() {
		return numberOfTickets;
	}
	public void setNumberOfTickets(Integer numberOfTickets) {
		this.numberOfTickets = numberOfTickets;
	}

	public Integer getNumberOfTicketsLeft() {
		return numberOfTicketsLeft;
	}

	public void setNumberOfTicketsLeft(Integer numberOfTicketsLeft) {
		this.numberOfTicketsLeft = numberOfTicketsLeft;
	}


	public boolean isSuccessOper() {
		return successOper;
	}


	public void setSuccessOper(boolean successOper) {
		this.successOper = successOper;
	}

	
	

}
